Open
Conversation
OHHAKO
reviewed
Jun 23, 2020
source/lee/team/20200621_연속합.md
Outdated
Comment on lines
+35
to
+38
Member
There was a problem hiding this comment.
푼제풀이 확인 했습니다:) 고생하셨어요! 프로그램의 첫번째 코드에 max 연산을 넣으면 최대값을 찾는 반복문을 수행하지 않을 수 있어요. 이미 알고 계실거라 생각하지만...ㅎㅎ
추가적으로 이 코드에서
MIN_VALUE는 숫자 클래스의 최소값 상수인데 0이 아닌 최소값 상수를 할당한 이유가 무엇인지 궁금해요!
OHHAKO
reviewed
Jun 23, 2020
Comment on lines
+7
to
+9
| 스택 두 개를 이용 | ||
|
|
||
| - 스택1은 push만, 스택2는 pop과 peek할 때만 사용함 |
Member
There was a problem hiding this comment.
영어문제를 풀어야 하는 일이 많으신가봐요! 저도 이 글 보고 링크 문제 확인해봤는데요.
전 스택1과 배열을 생성해서 풀려고 했네요ㅋㅋ
pop 메서드 호출 시
- 배열 생성
- stack 요소를 배열에 0부터 모두 저장
- 마지막 인덱스의 값 return
이 풀이는 배열해제를 시키지 않으면 가비지 데이터가 많이 생길 것 같고 매 pop마다 배열을 생성하는 번거로움이 있었어요. lee님이 푸신 스택 두개 이용하는게 가장 효율적인 것 같네요!
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.